.checkbox {
  background-color: var(--color-checkbox-bg);
  border-radius: $border-radius-input;
  cursor: pointer;
  height: 1.3rem;
  padding: 0.15rem;
  position: relative;
  width: 2.5rem;

  input {
    display: none;

    &[type='checkbox'] {
      & + label {
        background-color: var(--color-checkbox-toggle);
        opacity: 0.6;
      }

      &:checked + label {
        left: 1.35rem;
        opacity: 1;
      }
    }
  }

  label {
    border-radius: 50%;
    display: block;
    height: 1rem;
    left: 0.15rem;
    margin: 0 !important;
    min-height: 0;
    min-width: 0;
    padding: 0;
    pointer-events: none;
    position: absolute;
    width: 1rem;

    &.animate {
      transition-duration: 0.25s;
      transition-property: background-color, left, opacity;
      transition-timing-function: ease;
    }
  }
}

.form-group {
  margin-bottom: 1rem;
  position: relative;

  &.icon-button-container {
    input {
      padding-right: 2.3rem !important;
    }

    icon-button {
      margin-top: -0.75em;
      position: absolute;
      right: 0.7em;
      top: 50%;
      z-index: 55;
    }
  }

  &.has-error {
    input,
    textarea {
      &.form-control {
        border-color: var(--color-danger) !important;
        border-style: solid !important;
        border-width: 1px !important;
        color: var(--color-danger) !important;

        &::placeholder {
          color: var(--color-danger) !important;
          opacity: 0.8 !important;
        }
      }
    }
  }

  input,
  textarea {
    &.form-control {
      background-color: var(--color-input-bg);
      border-color: var(--color-input-border);
      border-style: solid;
      border-width: 1px;
      color: var(--color-input-text);
      font-size: 1rem;
      resize: none;
      width: 100%;

      &::placeholder {
        color: var(--color-input-placeholder);
      }
    }
  }

  input.form-control {
    border-radius: $border-radius-input;
    line-height: 2.4rem;
    padding: 0 1rem;
  }

  textarea.form-control {
    border-radius: 1.1rem;
    line-height: 1.2rem;
    padding: 0.5rem 1rem;
  }
}

.validation {
  background: var(--color-danger);
  border-radius: $border-radius-input;
  color: var(--color-validation-text);
  font-size: 0.75rem;
  left: 50%;
  line-height: 1.15rem;
  padding: 0 0.5rem;
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 60;
}
